package main

import (
	"fmt"
	"log"
	. "net/rpc"
	"serve/serve"
)

func main() {
	client, e := DialHTTP("tcp", "localhost:1234")
	if e != nil {
		log.Fatal("dialing:", e)
	}
	args := &serve.Args{7, 8}
	var reply int
	e = client.Call("Arith.Multiply", args, &reply) //方法名，入参，回参
	if e != nil {
		log.Fatal("arith error :", e)
	}
	fmt.Println("Arith: %d*%d=%d", args.A, args.B, reply)
}
